#pragma once

#include <intrin.h>


// WARNING!! if iBitMap == 0 the result is undefined
size_t FindLeastSignificantBitSetIndex(const size_t iBitMap);
// WARNING!! if iBitMap == 0 the result is undefined
size_t FindMostSignificantBitSetIndex(const size_t iBitMap);

size_t FindLeastSignificantBitSetMask(const size_t iBitMap);